package com.micro.center.controller;

import com.micro.common.aop.PermissionRole;
import com.micro.common.constant.Constant;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pan.shun
 * @since 2022/7/4 16:43
 */
@RestController
@RequestMapping("/center")
public class CenterController {

    @Value("${server.port}")
    private Integer port;

    @PermissionRole(role = Constant.ROLE.ADMIN + ":" + Constant.ROLE.USER)
    @GetMapping("/test")
    public String test() {
        return "服务中心端口：" + port;
    }
}
